﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace POVRay {
    public abstract class Object : Block {
        Transformation transformation = new Transformation();

        [PRParam()]
        public Pigment Pigment { get; set; }

        [PRParam()]
        public ObjectPhotons Photons { get; set; }

        [PRParam("inverse", HasValue = false)]
        public bool Inverse { get; set; }

        [PRParam()]
        public Transformation Transformation { get { return transformation; } set { transformation = value; } }

        [PRParam()]
        public Finish Finish { get; set; }
        
        protected String GeneralParameters(int level) {
            String pigment = Pigment != null ? Scene.Indentation(level) + Pigment.ToString(level) : "";
            String photons = Photons != null ? Scene.Indentation(level) + Photons.POVRayString(level) : "";
            String inverse = Inverse ? Scene.Indentation(level) + "inverse" : "";
            String transformation = Transformation != null ? Scene.Indentation(level) + Transformation.ToString(level) : "";
            String finish = Finish != null ? Scene.Indentation(level) + Finish.ToString(level) : "";
            return pigment + " " + photons + " " + inverse + " " + transformation + " " + finish;
        }
    }
}
